Repository navigation
Handle explicit sharding in array truncation - #79
Closed
sylvesterkaczmarek wants to merge 1 commit into
Closed
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
sylvesterkaczmarek
marked this pull request as ready for review
August 15, 2026 18:33
sylvesterkaczmarek
force-pushed
the
fix-explicit-sharded-array-truncation
branch
from
October 1, 2026 19:42
ca620c8 to
3421b27
Compare
Author
|
Following up after the maintenance pass. This branch is current with main, mergeable, has no failing checks or unresolved review threads, and the diff is unchanged from before today's signature-only rewrite. The new head is GitHub Verified. Could it be reviewed when convenient? |
Author
Collaborator
|
Closing this PR since the contributions appear to be automated and unrelated to real-world use of this library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #70.
Explicitly-sharded JAX arrays can reject ordinary slicing when the truncated dimension is not divisible by the mesh axis. Treescope currently hits that failure in
_truncate_part_with_slicesbefore the JITout_shardingsconstraint can make the final result replicated.For explicit
NamedSharding, convert the first shrinking slice to a gather with an explicitly replicated output on the same mesh. Remaining slices then operate on a replicated intermediate, while non-explicit and older JAX paths keep the existing behavior.The regression test forces four CPU devices in a subprocess and exercises
JAXArrayAdapter.get_array_data_with_truncationwith an explicitP("tp", None)sharding, verifying the 7x7 edge data and validity mask.Local validation:
ShardingTypeErrorwith four explicit CPU shardsThe full repository CI toolchain was not run locally because the environment could not fetch the development dependencies. The current Unittests workflow requires maintainer approval.